home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / s / linux-old.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-18  |  6.9 KB  |  220 lines

  1. /* This file is the configuration file for the GNU/Linux operating system,
  2.    prior to version 1.1.56.
  3.    Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc.
  4.  
  5. This file is part of GNU Emacs.
  6.  
  7. GNU Emacs is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11.  
  12. GNU Emacs is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU Emacs; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  20.  
  21. /* Synched up with: FSF 19.29 (called linux.h in FSF). */
  22.  
  23. /* This file was put together by Michael K. Johnson and Rik Faith.  */
  24.  
  25.  
  26. /*
  27.  *    Define symbols to identify the version of Unix this is.
  28.  *    Define all the symbols that apply correctly.
  29.  */
  30.  
  31. /* #define UNIPLUS */
  32. /* #define USG5 */
  33. #define USG
  34. /* #define BSD */
  35. #define LINUX
  36.  
  37. /* SYSTEM_TYPE should indicate the kind of system you are using.
  38.  It sets the Lisp variable system-type.  */
  39.  
  40. #define SYSTEM_TYPE "linux"        /* All the best software is free. */
  41.  
  42. /* Letter to use in finding device name of first pty,
  43.   if system supports pty's.  'p' means it is /dev/ptyp0  */
  44.  
  45. #define FIRST_PTY_LETTER 'p'
  46.  
  47. /*
  48.  *    Define HAVE_PTYS if the system supports pty devices.
  49.  */
  50.  
  51. #define HAVE_PTYS
  52.  
  53. /* define MAIL_USE_FLOCK if the mailer uses flock
  54.    to interlock access to /usr/spool/mail/$USER.
  55.    The alternative is that a lock file named
  56.    /usr/spool/mail/$USER.lock.  */
  57.  
  58. /* Both are used in Linux by different mail programs.  I assume that most
  59.    people are using newer mailers that have heard of flock.  Change this
  60.    if you need to. */
  61.  
  62. #define MAIL_USE_FLOCK
  63.  
  64. /* Here, on a separate page, add any special hacks needed
  65.    to make Emacs work on this system.  For example,
  66.    you might define certain system call names that don't
  67.    exist on your system, or that do different things on
  68.    your system and must be used only through an encapsulation
  69.    (Which you should place, by convention, in sysdep.c).  */
  70.  
  71. /* On POSIX systems the system calls are interruptible by signals
  72.  that the user program has elected to catch.  Thus the system call
  73.  must be retried in these cases.  To handle this without massive
  74.  changes in the source code, we remap the standard system call names
  75.  to names for our own functions in sysdep.c that do the system call
  76.  with retries. */
  77.  
  78. #define INTERRUPTIBLE_OPEN
  79. #define INTERRUPTIBLE_CLOSE
  80. #define INTERRUPTIBLE_IO
  81.  
  82. /* If you mount the proc file system somewhere other than /proc
  83.    you will have to uncomment the following and make the proper
  84.    changes */
  85.  
  86. /* #define LINUX_LDAV_FILE "/proc/loadavg" */
  87.  
  88. /* XEmacs change: The realpath() in linux's libc (4.6.27) sometimes
  89.  * fails with ELOOP erroneously.  For example, create a file
  90.  * thirty-five or so directories deep and call realpath on it.  You
  91.  * get ELOOP even if no symlinks at all are involved.
  92.  * -dkindred@cs.cmu.edu */
  93. #undef HAVE_REALPATH
  94.  
  95. /* This is needed for disknew.c:update_frame */
  96.  
  97. #ifdef emacs
  98. #include <stdio.h>  /* Get the definition of _IO_STDIO_H.  */
  99. #if defined(_IO_STDIO_H) || defined(_STDIO_USES_IOSTREAM)
  100. /* new C libio names */
  101. #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
  102.   ((FILE)->_IO_write_ptr - (FILE)->_IO_write_base)
  103. #else /* !_IO_STDIO_H */
  104. /* old C++ iostream names */
  105. #define GNU_LIBRARY_PENDING_OUTPUT_COUNT(FILE) \
  106.   ((FILE)->_pptr - (FILE)->_pbase)
  107. #endif /* !_IO_STDIO_H */
  108. #endif /* emacs */
  109.  
  110. /* Ask GCC where to find libgcc.a.  */
  111. #define LIB_GCC `$(CC) $(C_SWITCH_X_SITE) -print-libgcc-file-name`
  112.  
  113. #ifndef __ELF__
  114. /* Linux has crt0.o in a non-standard place */
  115. #define START_FILES pre-crt0.o /usr/lib/crt0.o
  116. #else
  117. #define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o
  118. #endif
  119.  
  120. /* Older versions of Linux don't implement SIGIO. */
  121. #define BROKEN_SIGIO
  122.  
  123. /* This is needed for sysdep.c */
  124.  
  125. #define NO_SIOCTL_H           /* don't have sioctl.h */
  126.  
  127. #define HAVE_SYS_SIGLIST
  128.  
  129. #define POSIX                 /* affects getpagesize.h and systty.h */
  130.  
  131. /* libc-linux/sysdeps/linux/i386/ulimit.c says that due to shared library, */
  132. /* we cannot get the maximum address for brk */
  133. #define ULIMIT_BREAK_VALUE (32*1024*1024)
  134.  
  135. #define SEGMENT_MASK ((SEGMENT_SIZE)-1)
  136.  
  137. /* Best not to include -lg, unless it is last on the command line */
  138. #define LIBS_DEBUG
  139. #define LIBS_TERMCAP -ltermcap -lcurses /* save some space with shared libs*/
  140. #ifndef __ELF__
  141. #define LIB_STANDARD -lc /* avoid -lPW */
  142. #else
  143. #undef LIB_GCC
  144. #define LIB_GCC
  145. #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
  146. #endif
  147.  
  148. /* Don't use -g in test compiles in configure.
  149.    This is so we will use the same shared libs for that linking
  150.    that are used when linking temacs.  */
  151. #ifdef THIS_IS_CONFIGURE
  152. #define C_DEBUG_SWITCH
  153. #endif
  154.  
  155. /* Let's try this out, just in case.
  156.    Nah.  Rik Faith <faith@cs.unc.edu> says it doesn't work well.  */
  157. /* #define SIGNALS_VIA_CHARACTERS */
  158.  
  159. #ifdef TERM
  160. #define LIBS_MACHINE -lclient
  161. #define C_SWITCH_SYSTEM -D_BSD_SOURCE -I/usr/src/term
  162. #else
  163. /* alane@wozzle.linet.org says that -lipc is not a separate library,
  164.    since libc-4.4.1.  So -lipc was deleted.  */
  165. #define LIBS_MACHINE
  166.  
  167. /* XFree86 is built with -DFUNCPROTO=11 -DNARROWPROTO so we better build
  168.    XEmacs with these switches too so that X functions get called correctly.
  169.    At least XawScrollbarSetThumb needs this. */ 
  170. #define C_SWITCH_SYSTEM -DFUNCPROTO=11 -DNARROWPROTO -D_BSD_SOURCE
  171. #endif
  172.  
  173. /* XEmacs change: configure doesn't find this because math.h aliases
  174.    rint to __rint so that it's not found. */
  175. #define HAVE_RINT 1
  176.  
  177. #ifdef __ELF__
  178. #define UNEXEC unexelf.o
  179. #define UNEXEC_USE_MAP_PRIVATE
  180. #endif
  181.  
  182. #ifdef LINUX_QMAGIC
  183.  
  184. #define HAVE_TEXT_START
  185. #define UNEXEC unexsunos4.o
  186. #define N_PAGSIZ(x) PAGE_SIZE
  187.  
  188. #else /* not LINUX_QMAGIC */
  189.  
  190. #define A_TEXT_OFFSET(hdr) (N_MAGIC(hdr) == QMAGIC ? sizeof (struct exec) : 0)
  191. #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr))
  192. #define ADJUST_EXEC_HEADER \
  193.   unexec_text_start = N_TXTADDR(ohdr) + A_TEXT_OFFSET(ohdr)
  194.  
  195. #endif /* not LINUX_QMAGIC */
  196.  
  197. /* Linux defines these in <values.h>, but they can't be used in #if's
  198.    Include values.h now so that we don't get complaints if it's included later. */
  199.  
  200. #include <values.h>
  201. #undef  SHORTBITS
  202. #undef  INTBITS
  203. #undef  LONGBITS
  204.  
  205. /* The regex.o routines are a part of the GNU C-library used with Linux.  */
  206. #define REGEXP_IN_LIBC
  207.  
  208. /* XEmacs change: the standard linux libc includes regex routines in
  209.    it.  We have to use our own and have to avoid name conflicts. */
  210.  
  211. #define re_compile_pattern sys_re_compile_pattern
  212. #define re_search sys_re_search
  213. #define re_search_2 sys_re_search_2
  214. #define re_match_2 sys_re_match_2
  215. #define re_max_failures sys_re_max_failures
  216.  
  217. /* XEmacs change: people have seen incorrect readings of TZ in the
  218.    pre-compiled binaries.  This should fix it. */
  219. #define LOCALTIME_CACHE
  220.